With the development of the information society, people are accustomed to using the Internet for social activities such as online shopping, online banking, and instant messaging. The exposure of online activities related to personal property attracts more attention of people (for example, a financial activity and a transaction activity). Therefore, people begin to monitor an Internet Protocol (IP) address of each terminal in the network, so as to evaluate a degree of threat in the network, and to prevent any high potential threats from an IP address. If necessary, an access request of such an IP address can be rejected, so as to improve overall network security.
However, in a traditional IP address acquisition method, when an IP address of a terminal is monitored, the IP address of the terminal can be obtained from a request or a response message header transmitted using the Hypertext Transfer Protocol (HTTP). However, it is easy for a malicious actor to change IP address information included in the HTTP message header by installing a browser plug-in or hacker software or by using a proxy server. Consequently, an accurate and authentic IP address may not be obtained.
It can be seen that, in traditional terminal IP address acquisition methods, authenticity and accuracy of an obtained IP address are relatively low, thereby reducing accuracy of other information processed based on the terminal IP address.